import torch
from transformers import pipeline

model_dir = 'content/KantaiBERT'
fill_mask = pipeline(
    "fill-mask",
    model=model_dir,
    tokenizer=model_dir,
    device="cuda",
)
result = fill_mask("Human thinking involves human <mask>.")
max_score_item = max(result, key=lambda item: item.get('score', 0))
sequence_value = max_score_item.get('sequence')
print(sequence_value)